function calculate() {
    var incomeTxt = document.getElementById('income').value;
    var roomTxt = document.getElementById('room').value;

    if (incomeTxt != "" && roomTxt != "") {
        incomeYear = 12 * incomeTxt;
        housePrice = roomTxt * 5000;

        if (incomeYear > housePrice) {
            alert('Congrats, for your new house.');
        }
        else {
            alert('Please decrease your room.');
        }
    }
    else {
        alert('Please complete your data');
    }
}